From 9e5b2a9dbf0b426c8062cf104662908a0e00cd73 Mon Sep 17 00:00:00 2001 From: Robert Lipe Date: Thu, 29 Dec 2016 01:38:24 -0500 Subject: [PATCH] Be even more pedantic with QStringLiteral - Make not just the array access, but also the value being set a literal. --- geojson.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/geojson.cc b/geojson.cc index b76a4d9ab..5c8fdf491 100644 --- a/geojson.cc +++ b/geojson.cc @@ -50,10 +50,10 @@ static void geojson_waypt_pr(const Waypoint* waypoint) { QJsonObject object; static const QString kType = QStringLiteral("type"); - object[kType] = "Feature"; + object[kType] = QStringLiteral("Feature"); QJsonObject geometry; - geometry[kType] = "Point"; + geometry[kType] = QStringLiteral("Point"); QJsonArray coords; coords.append(waypoint->longitude); @@ -62,7 +62,7 @@ geojson_waypt_pr(const Waypoint* waypoint) { coords.append(waypoint->altitude); } - geometry[kType] = "Point"; + geometry[kType] = QStringLiteral("Point"); geometry[QStringLiteral("coordinates")] = coords; object[QStringLiteral("geometry")] = geometry; @@ -95,7 +95,7 @@ geojson_rd_deinit() { static void geojson_wr_deinit(void) { QJsonObject object; - object[QStringLiteral("type")] = "FeatureCollection"; + object[QStringLiteral("type")] = QStringLiteral("FeatureCollection"); object[QStringLiteral("features")] = *feature_collection; QJsonDocument save(object); @@ -116,7 +116,7 @@ geojson_read(void) { static void geojson_track_hdr(const route_head* track) { track_object = new QJsonObject(); - (*track_object)[QStringLiteral("type")] = "Feature"; + (*track_object)[QStringLiteral("type")] = QStringLiteral("Feature"); track_coords = new QJsonArray(); QJsonObject properties; @@ -139,7 +139,7 @@ static void geojson_track_disp(const Waypoint* trackpoint) { static void geojson_track_tlr(const route_head* track) { QJsonObject geometry; - geometry[QStringLiteral("type")] = "LineString"; + geometry[QStringLiteral("type")] = QStringLiteral("LineString"); geometry[QStringLiteral("coordinates")] = *track_coords; (*track_object)[QStringLiteral("geometry")] = geometry; feature_collection->append(*track_object); -- 2.30.2